package com.thinkcube.edutainment.client;

import org.androidannotations.annotations.rest.Accept;
import org.androidannotations.annotations.rest.Post;
import org.androidannotations.annotations.rest.Rest;
import org.androidannotations.api.rest.MediaType;
import org.springframework.http.converter.FormHttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;

import com.thinkcube.edutainment.EdutainmentConstant;
import com.thinkcube.edutainment.domain.Forum;
import com.thinkcube.edutainment.domain.OtherForum;
import com.thinkcube.edutainment.domain.PostItem;

;

/**
 * shanuka gayashan @Cyberlmj 2:06:25 AM Email: shanuka.gayashan@cyberlmj.com
 */
@Rest(rootUrl = EdutainmentConstant.ROOT_URL, converters = {
		FormHttpMessageConverter.class, StringHttpMessageConverter.class,
		MappingJackson2HttpMessageConverter.class }, interceptors = { ThinkcubeInterceptor.class })
public interface ForumClient {
	/**
	 * 
	 * @param formfields
	 *            auth_token limit filter_by{ featured top_rated latest
	 *            recommended}
	 * @return
	 * @throws RestClientException
	 * 
	 */
	@Post("/api/forum/get-course-forum")
	@Accept(MediaType.APPLICATION_JSON)
	Forum getCoursesForum(MultiValueMap formfields) throws RestClientException;

	/**
	 * 
	 * @param formfields
	 *            auth_token term limit
	 * @return
	 * @throws RestClientException
	 */
	@Post("/api/forum/get-other-forums")
	@Accept(MediaType.APPLICATION_JSON)
	OtherForum getOtherForums(MultiValueMap formfields)
			throws RestClientException;

	@Post("/api/forum/get-forum")
	@Accept(MediaType.APPLICATION_JSON)
	Forum getForum(MultiValueMap formfields) throws RestClientException;

	@Post("/api/forum/get-post")
	@Accept(MediaType.APPLICATION_JSON)
	PostItem getPost(MultiValueMap formfields) throws RestClientException;

}
